<template>
<div>
    <!--href="javascript:;" 执行一段空白的javascript语句 -->
    <a href="javascript:;" v-for="num in 5" :key="num"
    @click="jumpHandler(num)">
        {{num}}
    </a>
</div>
</template>

<script>
export default {
    data(){
        return{

        }
    },
    methods:{
        jumpHandler(num){
            this.$emit('change-page',num)
        }
    }
}
</script>

<style scoped>
    a{
        display: inline-block;
        text-decoration: none;
        width: 30px;
        height: 30px;
        border: 1px solid black;
        margin-left: 5px;
        line-height: 30px;

    }
</style>